package com.lhz.common.page;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: LiHuaZhi
 * @Date: 2021/8/31 11:17
 * @Version: 1.0
 **/
@Data
@Schema(description = "分页查询参数")
public class BaseQueryParam {
    @Schema(description = "当前页码")
    private Integer pageNum;
    @Schema(description = "每页数量")
    private Integer pageSize;
    @Schema(description = "id")
    private String id;
    @Schema(description = "名称")
    private String name;

    /**
     * 数据范围（1：全部数据 2：自定数据 3：本部门及以下数据 4：本部门数据  5:个人数据）
     */
    @Schema(description = "数据权限范围", hidden = true)
    private Integer dataScope;

    @Schema(description = "部门id集合", hidden = true)
    private List<Integer> deptIds = new ArrayList<>();

    @Schema(description = "用户id", hidden = true)
    private String userId = null;

    @Schema(description = "默认部门id", hidden = true)
    private Integer deptId = null;

    /**
     * 需要在xml的sql条件语句最后写上
     * <if test="dataScope!=null">
     * ${dataScopeSql}
     * </if>
     */
    @Schema(description = "数据权限执行sql", hidden = true)
    private String dataScopeSql;
}
